class MessageSet 
{
	class MessageNode 
	{
		/**
		 * oMessage is a reference to a Message object, then the refNext points to the next node 
		 * that is available in the set linked list.
		 */
		private Message oMessage;
		private MessageNode refNext;
		
		/**
		 * Default constructor for the node.
		 */
		publicMessageNode();
		
		/**
		 * Constructor takes a message object and a reference to the next node in the linked set list.
		 * @param oMsg Message object to be part of node.
		 * @param refNxt Reference to next node.
		 */
		public MessageNode(Message oMsg, MessageNode refNxt);

		/**
		 * Simple getter, returns the Message Object.
		 * @return Message object.
		 */
		public Message getoMessage() 
		{
			return oMessage;
		}

		/**
		 * Set the Message object to a new passed Message.
		 * @param oMessage The new message to be passed.
		 */
		public void setoMessage(Message oMessage) 
		{
			this.oMessage = oMessage;
		}

		/**
		 * Get the next MessageNode and return it.
		 * @return The next Node.
		 */
		public MessageNode getRefNext() 
		{
			return refNext;
		}

		/**
		 * Set the next node to a new passed value.
		 * @param refNext The new next node.
		 */
		public void setRefNext(MessageNode refNext) 
		{
			this.refNext = refNext;
		}
	}
	
	private MessageNode head;
	private int size;

	/**
	 * Default constructor that sets the set to null.
	 */
	public MessageSet();
	
	/**
	 * Method that adds a node to the start of the list, only adds to the start if it isn't already in set.
	 * @param oMessage The message you want to add to the set.
	 * @return Boolean based on success.
	 */
	public boolean add(Message oMessage);
	
	/**
	 * Several of these simple find methods based on need.
	 * @param timeStamp A string to compare, should be already converted from TAI to standard.
	 * @return The node that matches first, if more than one should throw message back.
	 */
	public MessageNode findByTime(String timeStamp);
	
	/**
	 * Simple boolean search to see if the given object is contained, based on timestamp.
	 * @param timeStamp Timestamp to match to the given object.
	 * @return Boolean based on sucessful location in set.
	 */
	public boolean contains(String timeStamp);
	
	/**
	 * Method accepts a message set and returns its union with the calling one.
	 * That is, the returned set will contain all elements from set "this" and the msgSet.
	 * @param msgSet Passes set that contains message nodes.
	 * @return A new set based on this and msgSet.
	 */
	public MessageSet union(MessageSet msgSet);
	
	/**
	 * Method that accepts a set and returns the union of the passed set and the calling set.
	 * @param msgSet This msgSet will be the second set to intersect with.
	 * @return A new set that contains
	 */
	public MessageSet intersect(MessageSet msgSet);
	
	/**
	 * Display in a graphical way all set contents.
	 */
	public void showSetMembers;
}
